package com.ziytek.web.citizen.service;

import com.ziytek.web.citizen.util.CompressionUtils;
import org.springframework.stereotype.Service;

import java.io.IOException;

/**
 * @author fengh
 */
@Service
public class CompressionService {

    public byte[] compress(byte[] data) throws IOException {
        return CompressionUtils.compressWithZstd(data);
    }

    public byte[] decompress(byte[] compressedData) throws IOException {
        return CompressionUtils.decompressWithZstd(compressedData);
    }
}